package leetcode.code0166;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution166 implements IDebug {

	public abstract String fractionToDecimal(int numerator, int denominator);

	@Override
	public void debug1() {
		int numerator = 1;
		int denominator = 2;
		String e = "0.5";
		String r = this.fractionToDecimal(numerator, denominator);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		int numerator = 2;
		int denominator = 1;
		String e = "2";
		String r = this.fractionToDecimal(numerator, denominator);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug3() {
		int numerator = 2;
		int denominator = 3;
		String e = "0.(6)";
		String r = this.fractionToDecimal(numerator, denominator);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug4() {
		int numerator = 4;
		int denominator = 333;
		String e = "0.(012)";
		String r = this.fractionToDecimal(numerator, denominator);
		HelpDebug.compare(e, r);
	}

	public void debug5() {
		int numerator = 1;
		int denominator = 5;
		String e = "0.2";
		String r = this.fractionToDecimal(numerator, denominator);
		HelpDebug.compare(e, r);
	}

	public void debug6() {
		int numerator = 1;
		int denominator = 6;
		String e = "0.1(6)";
		String r = this.fractionToDecimal(numerator, denominator);
		HelpDebug.compare(e, r);
	}

	public void debug(int numerator, int denominator) {
		System.out.println(this.fractionToDecimal(numerator, denominator));
	}

}
